package com.example.chamberlainserver.security;

import java.io.Serializable;

/**
 * JWT认证成功后的响应对象
 */
public class JwtResponse implements Serializable {

    private static final long serialVersionUID = -8091879091924046844L;
    private final String token;
    private final String username;
    private final String role;
    private final String userId;
    private final String name;

    public JwtResponse(String token, String username, String role, String userId, String name) {
        this.token = token;
        this.username = username;
        this.role = role;
        this.userId = userId;
        this.name = name;
    }

    public String getToken() {
        return this.token;
    }

    public String getUsername() {
        return this.username;
    }

    public String getRole() {
        return this.role;
    }
    
    public String getUserId() {
        return this.userId;
    }
    
    public String getName() {
        return this.name;
    }
}